Component({
  data: {
    selected: 0,
    color: "#7A7E83",
    selectedColor: "#1296db",
    list: [
      {
        pagePath: "pages/help/help",
        text: "帮助",
        iconPath: "/static/icons/bangzhu_active.png",
        selectedIconPath: "/static/icons/bangzhu.png"
      },
      {
        pagePath: "pages/payment/payment",
        text: "缴费记录",
        iconPath: "/static/icons/jiaofei_active.png",
        selectedIconPath: "/static/icons/jiaofei.png"
      },
      {
        pagePath: "pages/accounting/accounting",
        text: "代理记账",
        iconPath: "/static/icons/dljz_active.png",
        selectedIconPath: "/static/icons/dljz.png"
      },
      {
        pagePath: "pages/information/information",
        text: "个人信息",
        iconPath: "/static/icons/geren_active.png",
        selectedIconPath: "/static/icons/geren.png"
      }
    ]
  },
  methods: {
    switchTab(e) {
      const data = e.currentTarget.dataset
      const url = data.path
      wx.switchTab({ url })
      this.setData({
        selected: data.index
      })
    }
  }
})